import request from '@/utils/request'
/**
 * get list ?
 * @param params {*}
 */
export function _get (params) {
    return request({
        url: '/supplier/getSupplierByPage',
        method: 'get',
        params: params
    })
}
export function _getAllSupplier (params) {
  return request({
    url: '/supplier/getAllSupplier',
    method: 'get',
    params: params
  })
}
export function _getAllSupplierGoodsByIdSup (idSup) {
  return request({
    url: '/supplier/getAllSupplierGoodsByIdSup?idSup=' + idSup,
    method: 'get'
  })
}
/**
 * get row ?
 * @param params {*}
 */
 export function _find (params) {
    return request({
        url: '/supplier/getSupplierByPage',
        method: 'get',
        params: params
    })
}

// 供應商退貨
export function _returnGoods (params) {
  return request({
    url: '/supplier/returnGoods',
    method: 'post',
    data: params
  })
}

// 新增數據
export function _post (params) {
    return request({
        url: '/supplier/addSupplier',
        method: 'post',
        data: params
    })
}
// 修改數據
export function _put (params) {
    return request({
        url: '/supplier/editSupplier',
        method: 'put',
        data: params
    })
}
// 刪除數據
export function _delete (params) {
    return request({
        url: '/supplier/deleteSupplier',
        method: 'delete',
        params: params
    })
}
